package com.sunkingdom.qq.demo.common;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.PrintWriter;

@Controller
@RequestMapping(value="/demo")
public class Demo {
	@RequestMapping(value="/spring")
	public void spring(HttpServletRequest request, HttpServletResponse response) throws IOException{
		PrintWriter out = response.getWriter();
		String responseText = "hello spring";
		System.out.println(responseText);
		out.print(responseText);
		out.close();
	}
}
